﻿namespace Webinator.Condition
{
    using Webinator.Condition.Base;
    using Webinator.Enums;

    /// <summary>
    /// Attribute base class.
    /// </summary>
    internal class NodeChanged : ConditionBase
    {
        /// <summary>
        /// Initializes a new instance of the <see cref="NodeChanged"/> class.
        /// </summary>
        public NodeChanged()
        {
            LookForValue = string.Empty;
        }

        /// <summary>
        /// Gets or sets the element locator.
        /// </summary>
        public Locator Locator { get; set; }

        /// <summary>
        /// Gets or sets the attribute.
        /// Set to <c>Custom</c> if you want to specify an attribute not found in the enumeration.
        /// </summary>
        public AttributeIs AttributeIs { get; set; }

        /// <summary>
        /// Gets or sets a custom attribute.
        /// </summary>
        public string CustomAttribute { get; set; }

        /// <summary>
        /// Gets or sets the value to look for, if set to null then it looks for any change.
        /// </summary>
        public string LookForValue { get; set; }

        /// <summary>
        /// Gets or sets a value indicating how to match the <c>LookForText</c>.
        /// </summary>
        public Comparison Comparison { get; set; }

        /// <summary>
        /// Gets or sets the node change type.
        /// </summary>
        public NodeChangeType ChangeType { get; set; }
    }
}
